import {connect} from 'dva'
import styles from './app.less'
import MainLayout from '../components/MainLayout/MainLayout'
const CountApp=({count,dispatch,location})=>{
	return(
		<MainLayout location={location}>
			<div className={styles.normal}>
				<div className={styles.record}>Highest Record:{count.record}</div>
				<div className={styles.current}>{count.current}</div>
				<div className={styles.button}>
					<button onClick={()=>{dispatch({type:'count/add'})}}>+</button>
				</div>
			</div>
		</MainLayout>
		)
}
function mapStateToProps(state){
	return {count:state.count}
}
export default connect(mapStateToProps)(CountApp)